package com.bawei.a2010kotlin.lifecycle

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.bawei.a2010kotlin.R

class LifeCycleActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_eactivity)
        //添加观察者
        lifecycle.addObserver(MyObserver())
    }
}